package ch13;
/*
5：定义一个字符串，输出他对应的字节和字符。*/
public class ch13exer6 {
    public static void main(String[] args) {
        String str ="java123";
        byte[] bytes=str.getBytes();

        System.out.println(str+"的字节为：");
        for(byte b:bytes)
        System.out.println(b);
        System.out.println("***************");
        System.out.println(str+"的字符为：");
        char[] chars=str.toCharArray();
        for(char c:chars)
            System.out.println(c);
    }
}
